<!DOCTYPE html><html><head><title>Linux 常用命令大全</title><meta charset='utf-8'>
<link href='https://cdn.maxiang.io/res-min/themes/marxico.css' rel='stylesheet'><style></style></head>
<body>
	<div id='preview-contents' class='note-content'>
                        
                    

<h2 id="linux-常用命令大全">Linux 常用命令大全</h2>

<div><div class="toc"><div class="toc">
<ul>
<li><ul>
<li><a href="#linux-常用命令大全">Linux 常用命令大全</a><ul>
<li><a href="#linux-下的ctrl-快捷键使用">linux 下的ctrl 快捷键使用</a></li>
<li><a href="#查看目录下所有文件">查看目录下所有文件</a></li>
<li><a href="#清屏">清屏</a></li>
<li><a href="#清理文件-日志">清理文件 - 日志</a></li>
<li><a href="#jar-启动运行">jar 启动运行</a></li>
<li><a href="#查看进程">查看进程</a></li>
<li><a href="#查看所有的历史命令">查看所有的历史命令</a></li>
<li><a href="#查看启动运行日志">查看启动运行日志</a></li>
<li><a href="#查看系统内存">查看系统内存</a></li>
<li><a href="#关机重启命令">关机重启命令</a></li>
<li><a href="#检查防火墙是否开启">检查防火墙是否开启</a></li>
<li><a href="#展示目录列表命令lslist">展示目录列表命令ls（list）</a></li>
<li><a href="#切换目录命令cdchange-directory">切换目录命令cd（change directory）</a></li>
<li><a href="#目录的创建mkdir和删除rmdir命令">目录的创建（mkdir）和删除（rmdir）命令</a></li>
<li><a href="#文件的创建touch和删除rm命令">文件的创建（touch）和删除（rm）命令</a></li>
<li><a href="#文件打包或解压命令tar">文件打包或解压命令tar</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>



<h3 id="linux-下的ctrl-快捷键使用">linux 下的ctrl 快捷键使用</h3>



<pre class="prettyprint hljs-dark"><code class="hljs groovy"><div class="hljs-line">ctrl+<span class="hljs-string">a:</span> <span class="hljs-comment">// 光标跳到首行</span>
</div><div class="hljs-line">ctrl+<span class="hljs-string">b:</span> <span class="hljs-comment">// 光标左移一个字母</span>
</div><div class="hljs-line">ctrl+<span class="hljs-string">c:</span> <span class="hljs-comment">// 杀死当前进程</span>
</div><div class="hljs-line">ctrl+<span class="hljs-string">d:</span> <span class="hljs-comment">// 删除提示符后一个字符或者exit或者logout</span>
</div><div class="hljs-line">ctrl+<span class="hljs-string">e:</span> <span class="hljs-comment">// 光标移到行尾</span>
</div><div class="hljs-line">ctrl+<span class="hljs-string">f:</span> <span class="hljs-comment">// 后移一个字符</span>
</div><div class="hljs-line">ctrl+<span class="hljs-string">h:</span> <span class="hljs-comment">// 删除光标前一个字符</span>
</div><div class="hljs-line">ctrl+<span class="hljs-string">k:</span> <span class="hljs-comment">// 清除光标后至行尾的内容</span>
</div><div class="hljs-line">ctrl+<span class="hljs-string">l:</span> <span class="hljs-comment">// 清屏 相当于clear</span>
</div><div class="hljs-line">ctrl+<span class="hljs-string">p:</span> <span class="hljs-comment">// 重复上一次命令</span>
</div><div class="hljs-line">ctrl+<span class="hljs-string">r:</span> <span class="hljs-comment">// 搜索之前使用过的命令,会有个一个提示 根据你输入的关键字</span>
</div><div class="hljs-line">        <span class="hljs-comment">// 搜索 history 历史记录</span>
</div><div class="hljs-line">ctrl+<span class="hljs-string">u:</span> <span class="hljs-comment">// 清除光标前至行首间的所有内容</span>
</div><div class="hljs-line">ctrl+<span class="hljs-string">w:</span> <span class="hljs-comment">// 同上</span>
</div><div class="hljs-line">ctrl+<span class="hljs-string">t:</span> <span class="hljs-comment">// 交换光标位置前两个字符</span>
</div><div class="hljs-line">ctrl+<span class="hljs-string">y:</span> <span class="hljs-comment">// 粘贴或者恢复上次的删除</span>
</div><div class="hljs-line">ctrl+<span class="hljs-string">d:</span> <span class="hljs-comment">// 删除光标所在字母 </span>
</div><div class="hljs-line">ctrl+<span class="hljs-string">z:</span> <span class="hljs-comment">// 把当前进程转到后台运行</span>
</div><div class="hljs-line">ctrl+<span class="hljs-string">x:</span> <span class="hljs-comment">// 同上但在按一次从新回到原来位置</span>
</div><div class="hljs-line">ctrl+<span class="hljs-string">s:</span> <span class="hljs-comment">// 暂停屏幕输出</span>
</div><div class="hljs-line">ctrl+<span class="hljs-string">q:</span> <span class="hljs-comment">// 恢复屏幕输出</span>
</div></code></pre>



<h3 id="查看目录下所有文件">查看目录下所有文件</h3>

<pre class="prettyprint hljs-dark"><code class="hljs vim"><div class="hljs-line"><span class="hljs-keyword">cd</span> /huazhu/jar/    // 先切换到此目录下
</div><div class="hljs-line"><wbr>
</div><div class="hljs-line"><span class="hljs-keyword">ll</span>   查看此目录下所有文件   - 竖向展示
</div><div class="hljs-line"><wbr>
</div><div class="hljs-line"><span class="hljs-keyword">ls</span>   查看此目录下所有文件   - 横向展示
</div><div class="hljs-line"><wbr>
</div><div class="hljs-line"><span class="hljs-keyword">ll</span> －t 是降序，  <span class="hljs-keyword">ll</span> －t ｜ tac 是升序
</div></code></pre>



<h3 id="清屏">清屏</h3>

<pre class="prettyprint hljs-dark"><code class="hljs ada"><div class="hljs-line">clear ： 清屏
</div><div class="hljs-line">Ctrl+l : 清屏 快捷键
</div></code></pre>



<h3 id="清理文件-日志">清理文件 - 日志</h3>

<pre class="prettyprint hljs-dark"><code class="hljs gams"><div class="hljs-line"><span class="hljs-symbol">$</span> : &gt; filename 
</div><div class="hljs-line"><span class="hljs-symbol">$</span> &gt; filename 
</div><div class="hljs-line"><span class="hljs-symbol">$</span> echo <span class="hljs-string">""</span> &gt; filename 
</div><div class="hljs-line"><span class="hljs-symbol">$</span> echo &gt; filename
</div><div class="hljs-line"><wbr>
</div><div class="hljs-line">cat /dev/null &gt;cscsc.<span class="hljs-built-in">log</span> -- 清空日志内容
</div><div class="hljs-line">rm -rf cscec.<span class="hljs-built-in">log</span>  -- 直接删除文件
</div><div class="hljs-line">echo &gt; /cscec.<span class="hljs-built-in">log</span> -- 清空日志内容
</div></code></pre>



<h3 id="jar-启动运行">jar 启动运行</h3>

<pre class="prettyprint hljs-dark"><code class="hljs stylus"><div class="hljs-line"><span class="hljs-comment">// jar 包命令启动</span>
</div><div class="hljs-line">nohup java -jar CscecSafetyService-<span class="hljs-number">1.0</span><span class="hljs-selector-class">.jar</span> --server.port=<span class="hljs-number">8087</span> <span class="hljs-number">2</span>&gt;&amp;<span class="hljs-number">1</span> &amp;
</div><div class="hljs-line"><wbr>
</div><div class="hljs-line"><span class="hljs-comment">// 带内存大小参数jar包 运行命令</span>
</div><div class="hljs-line">nohup java -jar -Xms512m -Xmx1024m health-common<span class="hljs-selector-class">.jar</span> &gt; hc<span class="hljs-selector-class">.log</span> &amp;
</div><div class="hljs-line"><wbr>
</div><div class="hljs-line">nohup java -jar -Xms512m -Xmx1024m health-manage<span class="hljs-selector-class">.jar</span> &gt; hm<span class="hljs-selector-class">.log</span> &amp;
</div><div class="hljs-line"><wbr>
</div><div class="hljs-line">nohup java -jar -Xms512m -Xmx1024m hospmanger<span class="hljs-selector-class">.jar</span> &gt; hs<span class="hljs-selector-class">.log</span> &amp;
</div><div class="hljs-line"><wbr>
</div><div class="hljs-line">nohup java -jar -Xms512m -Xmx1024m uploadfile<span class="hljs-selector-class">.jar</span> &gt; uf<span class="hljs-selector-class">.log</span> &amp;
</div></code></pre>



<h3 id="查看进程">查看进程</h3>

<pre class="prettyprint hljs-dark"><code class="hljs gradle"><div class="hljs-line">ps -ef | <span class="hljs-keyword">grep</span>  <span class="hljs-comment">// 查看所有进程ID</span>
</div><div class="hljs-line"><wbr>
</div><div class="hljs-line">lsof -i:端口  <span class="hljs-comment">//  根据端口号查询进程ID</span>
</div><div class="hljs-line"><wbr>
</div><div class="hljs-line">ps -ef | <span class="hljs-keyword">grep</span> java <span class="hljs-comment">//  根据java 查询Java所有进程ID</span>
</div><div class="hljs-line"><wbr>
</div><div class="hljs-line">kill -<span class="hljs-number">9</span> 端口号  <span class="hljs-comment">//  结束进程</span>
</div></code></pre>



<h3 id="查看所有的历史命令">查看所有的历史命令</h3>

<pre class="prettyprint hljs-dark"><code class="hljs bash"><div class="hljs-line"><span class="hljs-built_in">history</span> :历史命令
</div></code></pre>



<h3 id="查看启动运行日志">查看启动运行日志</h3>

<pre class="prettyprint hljs-dark"><code class="hljs haml"><div class="hljs-line">命令格式: tail[必要参数][选择参数][文件]
</div><div class="hljs-line">-<span class="ruby">f 循环读取</span>
</div><div class="hljs-line"><span class="ruby"></span>-<span class="ruby">q 不显示处理信息</span>
</div><div class="hljs-line"><span class="ruby"></span>-<span class="ruby">v 显示详细的处理信息</span>
</div><div class="hljs-line"><span class="ruby"></span>-<span class="ruby">c&lt;数目&gt; 显示的字节数</span>
</div><div class="hljs-line"><span class="ruby"></span>-<span class="ruby">n&lt;行数&gt; 显示行数</span>
</div><div class="hljs-line"><span class="ruby"></span>-<span class="ruby">q, --quiet, --silent 从不输出给出文件名的首部</span>
</div><div class="hljs-line"><span class="ruby"></span>-<span class="ruby">s, --sleep-interval=S 与-f合用,表示在每次反复的间隔休眠S秒</span>
</div><div class="hljs-line"><span class="ruby"></span>
</div><div class="hljs-line">tail -f cscec.log
</div><div class="hljs-line">tail -f cscec.log 循环读取日志
</div><div class="hljs-line">tail -n 10 cscec.log 查询日志尾部最后10行的日志;
</div><div class="hljs-line">tail -n +10 cscec.log 查询10行之后的所有日志;
</div><div class="hljs-line">tail -fn 10 cscec.log 循环实时查看最后1000行记录(最常用的)
</div></code></pre>

<p>### 查看磁盘IO使用情况 <br>
     命令：iostat -x 1 <br>
     // iostat -x 1 （1秒刷新一次）最右侧%util很高时，表示IO就很高了，若想看哪个进程占用IO，执行iotop命令查看</p>

<p>### 查看磁盘空间 <br>
    1. df -h   // 查看磁盘分区为单位 <br>
    2. df -hl  // 查看磁盘剩余空间</p>

<pre class="prettyprint hljs-dark"><code class="hljs lsl"><div class="hljs-line">文件系统     容量 已用 可用 已用% 挂载点　
</div><div class="hljs-line">/dev/vda1    <span class="hljs-number">99</span>G   <span class="hljs-number">29</span>G   <span class="hljs-number">66</span>G  <span class="hljs-number">31</span>%   /
</div><div class="hljs-line">devtmpfs     <span class="hljs-number">16</span>G     <span class="hljs-number">0</span>   <span class="hljs-number">16</span>G   <span class="hljs-number">0</span>%   /dev
</div><div class="hljs-line">tmpfs        <span class="hljs-number">16</span>G   <span class="hljs-number">12</span>K   <span class="hljs-number">16</span>G   <span class="hljs-number">1</span>%   /dev/shm
</div><div class="hljs-line">tmpfs        <span class="hljs-number">16</span>G  <span class="hljs-number">872</span>K   <span class="hljs-number">16</span>G   <span class="hljs-number">1</span>%   /run
</div><div class="hljs-line">tmpfs        <span class="hljs-number">16</span>G     <span class="hljs-number">0</span>   <span class="hljs-number">16</span>G   <span class="hljs-number">0</span>%   /sys/fs/cgroup
</div><div class="hljs-line">tmpfs        <span class="hljs-number">3.2</span>G    <span class="hljs-number">0</span>  <span class="hljs-number">3.2</span>G   <span class="hljs-number">0</span>%   /run/user/<span class="hljs-number">0</span>
</div><div class="hljs-line"><wbr>
</div><div class="hljs-line">df -hl <span class="hljs-comment">// 查看磁盘剩余空间</span>
</div><div class="hljs-line"><wbr>
</div><div class="hljs-line">df -h <span class="hljs-comment">// 查看每个根路径的分区大小</span>
</div><div class="hljs-line"><wbr>
</div><div class="hljs-line">du -sh [目录名]  <span class="hljs-comment">// 返回该目录的大小</span>
</div><div class="hljs-line"><wbr>
</div><div class="hljs-line">du -sm [文件夹] <span class="hljs-comment">// 返回该文件夹总M数</span>
</div><div class="hljs-line"><wbr>
</div><div class="hljs-line">du -h [目录名] <span class="hljs-comment">// 查看指定文件夹下的所有文件大小（包含子文件夹）</span>
</div></code></pre>



<h3 id="查看系统内存">查看系统内存</h3>

<pre class="prettyprint hljs-dark"><code class="hljs llvm"><div class="hljs-line"><span class="hljs-keyword">free</span> -m  // 查看内存
</div><div class="hljs-line"><span class="hljs-keyword">free</span> -h  // 查看内存 （建议使用）
</div><div class="hljs-line"><wbr>
</div><div class="hljs-line">[root<span class="hljs-title">@iz8vb1wy4teeo9cmfir8tyz</span> ~]# <span class="hljs-keyword">free</span> -h
</div><div class="hljs-line">       total    used   <span class="hljs-keyword">free</span>   shared  buff/cache   available
</div><div class="hljs-line">Mem:    <span class="hljs-number">31</span>G     <span class="hljs-number">20</span>G    <span class="hljs-number">417</span>M   <span class="hljs-number">944</span>K        <span class="hljs-number">9.9</span>G        <span class="hljs-number">9.9</span>G
</div><div class="hljs-line">Swap:   <span class="hljs-number">767</span>M     <span class="hljs-number">0</span>B    <span class="hljs-number">767</span>M
</div><div class="hljs-line"><wbr>
</div><div class="hljs-line">Mem：表示物理内存统计
</div><div class="hljs-line">Swap：表示硬盘上交换分区的使用情况
</div><div class="hljs-line"><wbr>
</div><div class="hljs-line">total：表示物理内存总量(total = used + <span class="hljs-keyword">free</span>)
</div><div class="hljs-line"><wbr>
</div><div class="hljs-line">used：表示总计分配给缓存（包含buffers 与cache ）使用的数量，但其中可能部分缓存并未实际使用。
</div><div class="hljs-line"><wbr>
</div><div class="hljs-line"><span class="hljs-keyword">free</span>：未被分配的内存。shared：共享内存。
</div><div class="hljs-line"><wbr>
</div><div class="hljs-line">buffers：系统分配但未被使用的buffers 数量。cached：系统分配但未被使用的cache 数量。
</div><div class="hljs-line"><wbr>
</div><div class="hljs-line">used<span class="hljs-number">2</span>：也就是第一行中的used – buffers-cached 也是实际使用的内存总量。 //used<span class="hljs-number">2</span>为第二行
</div><div class="hljs-line"><wbr>
</div><div class="hljs-line"><span class="hljs-keyword">free</span><span class="hljs-number">2</span>= buffers<span class="hljs-number">1</span> + cached<span class="hljs-number">1</span> + <span class="hljs-keyword">free</span><span class="hljs-number">1</span> //<span class="hljs-keyword">free</span><span class="hljs-number">2</span>为第二行、buffers<span class="hljs-number">1</span>等为第一行
</div><div class="hljs-line"><wbr>
</div><div class="hljs-line"><span class="hljs-keyword">free</span><span class="hljs-number">2</span>：未被使用的buffers 与cache 和未被分配的内存之和，这就是系统当前实际可用内存。 
</div></code></pre>



<h3 id="关机重启命令">关机重启命令</h3>

<pre class="prettyprint hljs-dark"><code class="hljs stylus"><div class="hljs-line"><span class="hljs-number">1</span><span class="hljs-selector-class">.shutdown</span> -h now  <span class="hljs-comment">// 马上关机</span>
</div><div class="hljs-line"><span class="hljs-number">2</span><span class="hljs-selector-class">.shutdown</span> -r now  <span class="hljs-comment">// 马上重启</span>
</div><div class="hljs-line"><span class="hljs-number">3</span><span class="hljs-selector-class">.reboot</span> <span class="hljs-comment">// 重启 （常用）</span>
</div><div class="hljs-line">  reboot init6
</div><div class="hljs-line"><span class="hljs-number">4</span><span class="hljs-selector-class">.halt</span>  <span class="hljs-comment">// 关机   </span>
</div></code></pre>



<h3 id="检查防火墙是否开启">检查防火墙是否开启</h3>

<pre class="prettyprint hljs-dark"><code class="hljs autoit"><div class="hljs-line">命令： service iptables status
</div><div class="hljs-line"><wbr>
</div><div class="hljs-line">chkconfig --level <span class="hljs-number">5</span> iptavles on:打开防火墙
</div><div class="hljs-line"><wbr>
</div><div class="hljs-line">chkconfig --level <span class="hljs-number">5</span> iptables off: 关闭防火墙
</div><div class="hljs-line"><wbr>
</div><div class="hljs-line">[root<span class="hljs-symbol">@centos6</span> ~]<span class="hljs-meta"># service iptables status</span>
</div><div class="hljs-line"><wbr>
</div><div class="hljs-line">iptables：未运行防火墙。
</div><div class="hljs-line"><wbr>
</div><div class="hljs-line">开启防火墙：
</div><div class="hljs-line"><wbr>
</div><div class="hljs-line">[root<span class="hljs-symbol">@centos6</span> ~]<span class="hljs-meta"># service iptables start</span>
</div><div class="hljs-line"><wbr>
</div><div class="hljs-line">关闭防火墙：
</div><div class="hljs-line"><wbr>
</div><div class="hljs-line">[root<span class="hljs-symbol">@centos6</span> ~]<span class="hljs-meta"># service iptables stop</span>
</div></code></pre>



<h3 id="展示目录列表命令lslist">展示目录列表命令ls（list）</h3>



<pre class="prettyprint hljs-dark"><code class="hljs vim"><div class="hljs-line"><span class="hljs-keyword">ls</span>              // 展示当前目录下的可见文件
</div><div class="hljs-line"><span class="hljs-keyword">ls</span> -<span class="hljs-keyword">a</span>         展示当前目录下所有的文件（包括隐藏的文件）
</div><div class="hljs-line"><span class="hljs-keyword">ls</span> -<span class="hljs-keyword">l</span>(<span class="hljs-keyword">ll</span>)      展示当前目录下文件的详细信息
</div><div class="hljs-line"><span class="hljs-keyword">ll</span> -<span class="hljs-keyword">a</span>          展示当前目录下所有文件的详细信息
</div><div class="hljs-line"><span class="hljs-keyword">ll</span> -h          友好的显示当前目录下文件的详细信息（其实就是文件的大小可读性更强了）
</div></code></pre>



<h3 id="切换目录命令cdchange-directory">切换目录命令cd（change directory）</h3>



<pre class="prettyprint hljs-dark"><code class="hljs stata"><div class="hljs-line"><span class="hljs-keyword">cd</span> <span class="hljs-keyword">test</span><span class="hljs-comment">// 切换到test目录下</span>
</div><div class="hljs-line"><span class="hljs-keyword">cd</span> ..  <span class="hljs-comment">// 切换到上一级目录</span>
</div><div class="hljs-line"><span class="hljs-keyword">cd</span> /   <span class="hljs-comment">// 切换到系统根目录下</span>
</div><div class="hljs-line"><span class="hljs-keyword">cd</span> ~   <span class="hljs-comment">// 切换到当前用户的根目录下</span>
</div><div class="hljs-line"><span class="hljs-keyword">cd</span> -   <span class="hljs-comment">// 切换到上一级所在的目录</span>
</div></code></pre>



<h3 id="目录的创建mkdir和删除rmdir命令">目录的创建（mkdir）和删除（rmdir）命令</h3>



<pre class="prettyprint hljs-dark"><code class="hljs stata"><div class="hljs-line"><span class="hljs-keyword">mkdir</span> <span class="hljs-keyword">test</span> <span class="hljs-comment">// 在当前目录下创建一个test目录</span>
</div><div class="hljs-line"><span class="hljs-keyword">mkdir</span> -p <span class="hljs-keyword">test</span>/a/b  <span class="hljs-comment">//在test目录下的a目录下创建一个b目录，如果上一级目录不存在，则连它的父目录一起创建</span>
</div><div class="hljs-line"><span class="hljs-keyword">rmdir</span> <span class="hljs-keyword">test</span> <span class="hljs-comment">// 删除当前目录下的test目录（注意：该命令只能够删除空目录）</span>
</div></code></pre>



<h3 id="文件的创建touch和删除rm命令">文件的创建（touch）和删除（rm）命令</h3>



<pre class="prettyprint hljs-dark"><code class="hljs stata"><div class="hljs-line">touch <span class="hljs-keyword">test</span>.txt  <span class="hljs-comment">// 在当前目录下创建一个test.txt的文件</span>
</div><div class="hljs-line"><span class="hljs-keyword">rm</span> <span class="hljs-keyword">test</span>.txt  <span class="hljs-comment">// 删除test.txt的文件（带询问的删除，需输入y才能删除）</span>
</div><div class="hljs-line"><span class="hljs-keyword">rm</span> -f <span class="hljs-keyword">test</span>.txt  <span class="hljs-comment">// 直接删除text.txt文件</span>
</div><div class="hljs-line"><span class="hljs-keyword">rm</span> -r <span class="hljs-keyword">test</span>  <span class="hljs-comment">// 递归删除，即删除test目录以及其目录下的子目录（带询问的删除）</span>
</div><div class="hljs-line"><span class="hljs-keyword">rm</span> -rf <span class="hljs-keyword">test</span> <span class="hljs-comment">// 直接删除test目录以及其目录下的子目录</span>
</div></code></pre>



<h3 id="文件打包或解压命令tar">文件打包或解压命令tar</h3>



<pre class="prettyprint hljs-dark"><code class="hljs stylus"><div class="hljs-line"><span class="hljs-comment">// 打包并压缩/test下的所有文件 压缩后的压缩包指定名称为xxx.tar.gz</span>
</div><div class="hljs-line">tar -zcvf xxx<span class="hljs-selector-class">.tar</span><span class="hljs-selector-class">.gz</span> aaa<span class="hljs-selector-class">.txt</span> bbb<span class="hljs-selector-class">.txt</span> ccc<span class="hljs-selector-class">.txt</span>
</div><div class="hljs-line">tar -zcvf xxx<span class="hljs-selector-class">.tar</span><span class="hljs-selector-class">.gz</span> /test<span class="hljs-comment">/*</span>
</div></code></pre>



<pre class="prettyprint hljs-dark"><code class="hljs stylus"><div class="hljs-line">解压压缩包:
</div><div class="hljs-line"><wbr>
</div><div class="hljs-line">        命令：tar [-xvf] 压缩文件
</div><div class="hljs-line"><wbr>
</div><div class="hljs-line">        其中：x：代表解压
</div><div class="hljs-line"><wbr>
</div><div class="hljs-line">        示例：将/test下的xxx<span class="hljs-selector-class">.tar</span><span class="hljs-selector-class">.gz</span>解压到当前目录下
</div><div class="hljs-line"><wbr>
</div><div class="hljs-line">        tar -xvf xxx<span class="hljs-selector-class">.tar</span><span class="hljs-selector-class">.gz</span>
</div><div class="hljs-line"><wbr>
</div><div class="hljs-line">        示例：将/test下的xxx<span class="hljs-selector-class">.tar</span><span class="hljs-selector-class">.gz</span>解压到根目录/usr下
</div><div class="hljs-line"><wbr>
</div><div class="hljs-line">        tar -xvf xxx<span class="hljs-selector-class">.tar</span><span class="hljs-selector-class">.gz</span> -C /usr------C代表指定解压的位置
</div></code></pre></div></body></html>